﻿namespace FiftyOne.Foundation.Mobile.Configuration
{
    using System;
    using System.Configuration;

    public sealed class UrlElement : ConfigurationElement
    {
        [ConfigurationProperty("days", IsRequired=false, DefaultValue=7)]
        public int Days
        {
            get
            {
                return (int) base["days"];
            }
        }

        [ConfigurationProperty("enabled", IsRequired=false, DefaultValue=true)]
        public bool Enabled
        {
            get
            {
                return (bool) base["enabled"];
            }
        }

        [ConfigurationProperty("url", IsRequired=true), StringValidator(InvalidCharacters="!@#$%^*()[]{};'\"|", MaxLength=0xff)]
        public string Url
        {
            get
            {
                return (string) base["url"];
            }
        }
    }
}

